<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./download/font_3774190_9e80b5fcvrq/iconfont.css">
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        header{
            height: 70px;
            background-color: rgb(24, 114, 170);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        header span:nth-child(1){
            padding-left: 20px;
            color: white;
        }
        header .headright span:nth-child(2){
            padding-right: 18px;
            color: white;
        }
        main{
            display: flex;
        }
        aside{
            width: 130px;
            height: 500px;
            background-color: rgb(24, 114, 170);
            overflow: hidden;
            /* float: left; */
        }
        aside div{
            height: 40px;
            width: 130px;
            color: white;
            background-color: rgb(24, 114, 170);
            display:flex;
            padding-left: 30px;
            font-size: 14px;
            text-align: center;
            box-sizing: border-box;
            margin-top: 30px;
        }
        aside div span{
            padding-right: 10px;
            font-size: 14px;
        }
        main .mainright{
            width: 100%;
            padding: 25px;
        }
        main .mainright .top input{
            height: 30px;
            width: 250px;
            border-radius: 12px;
            margin-top: 30px;
            margin-left: 20px;
            padding-left: 5px;

        }
        main .mainright .top button{
            height: 30px;
            width: 80px;
            background-color: rgb(51, 176, 51);
            color: white;
            text-align: center;
            margin-left: 20px;
            border-radius: 7px;
            border: 0;
        }
        .mid button{
            height: 30px;
            width: 100px;
            background-color: rgb(51, 176, 51);
            color: white;
            text-align: center;
            margin-top: 20px;
            margin-left: 20px;
            border-radius: 7px;
            border: 0;
        }
        .mainright table{
            margin: 20px 15px;
            width: 100%;
            line-height: 30px;
            text-align: center;
        }
        .mainright table th{
            max-width: 200px;
        }
        .mainright table  tr th:nth-child(1){
            text-align: left;
        }
        .mainright table tr td:nth-child(1){
            text-align: left;
        }
        .foot{
            text-align: center;
        }
        .foot button{
            margin-right: 30px;
        }


    </style>
</head>
<body>
    <header>
        <span>9466云专题</span>
        <div class="headright">
            <span class="iconfont icon-yonghu"></span>
            <span>龙猫(9466云专题)</span>
        </div>
    </header>
    <main>
        <aside>
           <div>
            <span class="iconfont icon-shouye"></span>
            <p>首页</p>
           </div>
           <div>
            <span class="iconfont icon-rizhi1"></span>
            <p>专题</p>
           </div>
           <div>
            <span class="iconfont icon-yonghu"></span>
            <p>用户</p>
           </div>
           <div>
            <span class="iconfont icon-shezhi"></span>
            <p>设置</p>
           </div>
           <div>
            <span class="iconfont icon-rizhi"></span>
            <p>日志</p>
           </div>
        </aside>
        <div class="mainright">
            <div class="top">
                <input type="text" placeholder="搜索用户">
                <button>搜索</button>
            </div>
            <div class="mid">
                <button> + 添加用户</button>
            </div>
            <table>
                <thead>
                    <tr>
                    <th>邮箱(账户)</th>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>所属组</th>
                    <th>管理员</th>
                    <th>状态</th>
                    <th>地址</th>
                    </tr>
                </thead>
                <tbody>
                    <!-- <tr>
                        <td>34524352@qq.com</td>
                        <td>张大炮</td>
                        <td>175908566895</td>
                        <td>海外</td>
                        <td>是</td>
                        <td>正常</td>
                        <td>操作</td>
                    </tr>
                    <tr>
                        <td>34524352@qq.com</td>
                        <td>张大炮</td>
                        <td>175908566895</td>
                        <td>海外</td>
                        <td>是</td>
                        <td>正常</td>
                        <td>操作</td>
                    </tr> -->
                    
                </tbody>
            </table>
            <div class="foot">
                <button>上一页</button>
                <button>下一页</button>
            </div>
            
             
        </div>
    </main>
</body>
</html>
<script src="https://cdn.bootcdn.net/ajax/libs/Mock.js/1.0.0/mock.js"></script>
<script src="./mockdata.js"></script>
<script src="./mock.js"></script>
<!-- <script src="./promise封装.js"></script> -->

<script>
    render(data.list)
    //进行渲染
    function render(data){
        var str=data.map((item)=>{
           return `<tr>
                        <td>${item.email}</td>
                        <td>${item.name}</td>
                        <td>${item.telephone}</td>
                        <td>${item.group}</td>
                        <td>${item.admin?true:false}</td>
                        <td>${item.status?'正常':'异常'}</td>
                        <td>${item.address}</td>
                    </tr>`
        }).join('')
        document.querySelector('tbody').innerHTML=str
    }

</script>